//
//package com.js.lib_common.view;
//
//import android.annotation.SuppressLint;
//import android.content.Context;
//import android.widget.TextView;
//
//import com.github.mikephil.charting.components.MarkerView;
//import com.github.mikephil.charting.data.CandleEntry;
//import com.github.mikephil.charting.data.Entry;
//import com.github.mikephil.charting.highlight.Highlight;
//import com.github.mikephil.charting.utils.MPPointF;
//import com.github.mikephil.charting.utils.Utils;
//import com.js.lib_common.R;
//
//
///**
// *
// * 图表的MarkerView
// */
//@SuppressLint("ViewConstructor")
//public class ChartMarkerview extends MarkerView {
//
//    private final TextView tvContent;
//
//    public ChartMarkerview(Context context, int layoutResource) {
//        super(context, layoutResource);
//
//        tvContent = findViewById(R.id.tvContent);
//    }
//
//    // runs every time the MarkerView is redrawn, can be used to update the
//    // content (user-interface)
//    @Override
//    public void refreshContent(Entry e, Highlight highlight) {
//
//        if (e instanceof CandleEntry) {
//
//            CandleEntry ce = (CandleEntry) e;
//
//            tvContent.setText(Utils.formatNumber(ce.getHigh(), 1, true));
//        } else {
//
//            tvContent.setText(Utils.formatNumber(e.getY(), 1, true));
//        }
//
//        super.refreshContent(e, highlight);
//    }
//
//    @Override
//    public MPPointF getOffset() {
//        return new MPPointF(-(getWidth() / 2), -getHeight());
//    }
//}
